package com.yuma.springshiroredisthymeleaf.dao;

import com.yuma.springshiroredisthymeleaf.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.SQLException;
import java.util.List;
@Mapper
public interface GoodsDao {
    // 根据id查询商品
    Goods selectById(Integer id) throws SQLException;
    Goods selectById2(@Param("a") Integer id) throws SQLException;
    Goods selectById3(Goods goods) throws SQLException;
    Goods selectById4(Goods goods) throws SQLException;
    // 选择性插入
    Integer insertSelective(Goods goods) throws  SQLException;
    // 选择性更新
    Integer updateSelective(Goods goods) throws SQLException;
    // 条件查询
    List<Goods> selectByCondition(Goods goods) throws SQLException;
    // 根据id批量删除
    int deleteByIds(@Param("ids") List<Integer> ids) throws SQLException;
    // 根据id删除
    int deleteById(Integer id);
}
